package main.errorUpdate;

import swingExtended.progressPanel.GuiUpdate;
import swingExtended.progressPanel.ProgressPanel;

/**
 *
 * @author g1wshimu
 */
public class ErrorUpdate extends GuiUpdate {

    protected final String MSG;
    protected final Exception EX;

    public ErrorUpdate(ProgressPanel panel, String msg, Exception ex) {
        super(panel);
        this.MSG = msg;
        this.EX = ex;
    }
    
    public ErrorUpdate(ProgressPanel panel, String msg) {
        this(panel, msg, null);
    }
    
    @Override
    public void update() {
        getPanel().getErrorTextPane().exceptionPrintln(MSG, EX);        
    }
}
